import request from "../common/request";
/**
 * 获取矿池列表
 * 
*/
export function getPoolList(){
    return request({
      url: 'pool/getBasicData',
      methods: 'GET',
    })
}

/**
 * 获取个人贡献排行榜
*/
export function getRankingList(data){
    return request({
      url: 'pool/getListSortData',
      data,
      methods: 'GET',
    })
}


/**
 * 确认挖矿
*/
export function commitpledge(data){
  return request({
    url: 'pool/pledge',
    data,
    methods: 'GET',
  })
}



/**
 * 获取nft列表
*/
export function getnftList(data){
  return request({
    url: 'pool/getUserNftHoldListData',
    data,
    methods: 'GET',
  })
}


/**
 * 获取注册地址
*/
export function registerNFTAddress(data){
  return request({
    url: 'stc_user/register',
    data,
    methods: 'GET',
  })
}


/**
 * 查询总算力
*/
export function getCalcListData(data){
  return request({
    url: 'pool/getPersonalCalculateListData',
    data,
    methods: 'GET',
  })
}

/**
 * 查询总算力
*/
export function calculate(data){
  return request({
    url: 'pool/getCalculateData',
    // header: {
    //   'content-type': 'application/json',
    // },
    data,
    methods: 'POST',
  })
}

/**
 * 质押
*/
export function doPledge(data){
  return request({
    url: 'pool/pledge',
    data,
    methods: 'POST',
  })
}


/**
 * 查询质押记录
*/
export function getLogList(data){
  return request({
    url: 'pool/getLogListData',
    data,
    methods: 'GET',
  })
}

/**
 * 退出贡献池
 */
export function doExit(data){
  return request({
    url: 'pool/removePledge',
    data,
    methods: 'GET',
  })
}

/**
 * 领取收益
 */
export function doEarn(data){
  return request({
    url: 'pool/getEarnData',
    data,
    methods: 'GET',
  })
}

